Added workaround for PHP < 5.4.11 session handling