[API/FIX] add FreeBSD support to build system

Tested on FreeBSD 10.0. Both gcc49 and system compiler (clang with libc++) tested.
[NOP] cosmetic correction
[BUILD] reverse e80c156c18699fe3b82c6d9302fe54c1462eca89
[BUILD] reverse 920d338ac1ef9d294a34249de33b02fafeed57e7 partially
[BUILD] moved platform to top and exit with warning if unknown platform is detected
Merge pull request #453 from h-2/feature/freebsd-support

Feature/freebsd support