Prepare for FreeBSD 11 and 12.
Merge branch 'V5-4-patches' into V5-5-patches

* V5-4-patches:
  Prepare for FreeBSD 11 and 12.
Prepare for FreeBSD 11 and 12
Prepare for FreeBSD 11 and 12