add code to check if we know flock definition on this system

In order to configure detect it and not fail the compile.
Not an ideal solution, suggestions are welcome on how to improve it.
Merge branch 'PHP-5.5'

* PHP-5.5:
  add code to check if we know flock definition on this system