This fixes issues with x86_64 builds, which would cause very strange errors to occur.
Add support for bool values, use ssize_t in some places (not sure about this) and some other stuff.