Fixed Bug #7291

Special Thanks to Haru!
http://hercules.ws/board/tracker/issue-7291-segmentation-fault-in-run-script-main-on-mapserver-startup/

Signed-off-by: shennetsind <ind@henn.et>