Fix changing the user shell on FreeBSD

The same error as in #3374 and #3355, somehow didn't manage to catch it earlier.