fixes "[: -lt: unexpected operator" on freebsd 10+