Avoid PHP Notice when initiated via API

When this module gets initiated locally via an API call, $_SERVER key
REQUEST_URI doesn't exist. By checking for it's existence with isset()
we're avoiding unnecessary PHP Notice.