Check for did_action('wp_head'). Closes #1142