WordPress 3.8.1 and below compatibility

Only set the SQL mode if we are in WP >= 3.9.