Export $PATH and $LD_LIBRARY_PATH when bundling PHP.

Closes #31.

(cherry picked from commit cac0e3d7fe05ad9549833c05deea55b6abe33bde)