build: Respect CC environment variable on FreeBSD.
Fixes #1674.
We use the compiler that CC environment variable indicates.
If CC is ommited, use gcc or clang which is installed.
If gcc is chosen, we need to add `-Wl,-rpath` option to make runtime linker
linking gcc's runtime libraries from installed path. For example, gcc7's
runtime libraries are installed in `/usr/local/lib/gcc7` by default.
And we also need to link libc++ first to make libc++ initializer is called
on runtime.