fixed build broken under freebsd

Hello,

The first commit fix compile issue under freebsd (cflags and ldflags).
The second one updates the binding.gyp to use same conditions
under all non-windows platforms (avoids duplicates).