$wpdb->esc_like was introduced on WP 4.0 and does not exist on previous versions.