Define wp_is_mobile() function

It's normally defined in `vars.php`, and some plugins / themes expect it

Fixes #1542, #1531