fix bad pointer cast in ext/phar, fix segfault and failed tests (bigendian)