fix crash on FreeBSD - #198