sys.platform does not start with 'bsd' on any of the BSDs implementing kqueue. Use an explicit enumeration of those that do (at least in recent releases).