Merge branch 'V5-5-patches' into V5-6-patches

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