gyp: fix build on smartos and freebsd
v0.30.3

Signed-off-by: Fedor Indutny <fedor@indutny.com>