Prevent headers being sent by wp_send_json()

Fixes #6244