_XT_OSC
should be
_HS_OSC
with a resonator.

LCD_DBIT 0
change to
LCD_DBIT 4

Maybe...

Why AnyPin worked? I have no idea.