Small changes to compile chirp on FreeBSD

@batrick Could you check if the changes preserve the old behavior on linux?