Use byte swapping functions from <libkern/OSByteOrder.h> on OS X

Remove inclusion of Core Foundation headers to avoid type conflicts with LZMA SDK.
Use correct 'true' keyword
Fix incorrect actor flag handling on big endian platforms
Merge pull request #78 from alexey-lysiuk/fix_osx_build

Fix OS X build