Minor fixes to JSON handling

 * Using the native `json_last_error_msg` function
 * Checking tha UTF8 constant exists before using it for PHP 5.2
compat.
 * Renaming exception toggle to `throwJsonExceptions`

closes #44