Ease building with custom includedir.
Fix pcre.h search path for custom build_includedir.
Supply backup file suffix for sed to make it work in OSX.
Merge pull request #7316 from crayxt/master

Ease building with custom includedir.