The mibam include file reads the osc set in your defines. But if you define your oscillator after the mibam include file, then it assumes your osc is 4 mhz (I think).

Try defining your OSC before your mibam include.