Fix implicit conversion warnings under OS X