Fix for PHP 5.4+ function import_request_variables is removed

Fixed main compatibility points. The code is still not perfect, but works.