Fix build under PHP 5.3.6
Refactor config.m4
Add option --with-nacl-libdir

for the custom location of nacl libraries