Send proper JSON header when responding to AJAX call