In FreeBSD, -i requires an argument, which is apparently why things go wrong.
Something like this may fix the immediate problem
and Linux seems to accept it too, but I don't know how much more portable it is, and anyway it looks hack-ish. Maybe it makes more sense to get rid of inline altogether, especially since it's apparently the only test that does it.
Or disable the test for freebsd if you so prefer.