FIX: OS X compilation fixes