cgi: fix overriding 'PATH' environment variable

Signed-off-by: Petar Paradzik <petar.paradzik@sartura.hr>
diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c
index 219febb..a3179c6 100755
--- a/lib/libwebsockets.c
+++ b/lib/libwebsockets.c
@@ -2646,6 +2646,8 @@
 			p++;
 		}
 	}
+	env_array[n++] = "PATH=/bin:/usr/bin:/usr/local/bin:/var/www/cgi-bin";
+
 	env_array[n++] = p;
 	p += lws_snprintf(p, end - p, "SCRIPT_PATH=%s", exec_array[0]) + 1;
 
@@ -2660,7 +2662,6 @@
 	}
 
 	env_array[n++] = "SERVER_SOFTWARE=libwebsockets";
-	env_array[n++] = "PATH=/bin:/usr/bin:/usr/local/bin:/var/www/cgi-bin";
 	env_array[n] = NULL;
 
 #if 0