Take odd $_SERVER['SCRIPT_NAME'] for lightspeed servers into account. Fixes #616.