Hack in HTTP_USER_AGENT check to prevent issues with phpunit