Okay, problem solved. Use the code
LDA #%00011000
STA ICS_C1
LDA #%00110110
STA ICS_C2
Thanks to vincentegomez at the NXP forum.
Among other things, the external clock has to be divided down so the resulting frequency is in the range 31.25 kHz to 39.0625 kHz. Bit 5 of ICS_C2 and bits 5,4,3 of ICS_C1 select a divide ratio.