add missing prototypes and use new OSX swapping routines
Authored by: hjelmn 2012-11-29
Parent: [r63]
Child: [r65]