Fix JSON support for OS X