Merge pull request #3446 from ethomson/portability portability: use `CHECK_FUNCTION_EXISTS` for checking whether functions exist...