Make AFT serial port lookup more flexible.

* Various prefixes are tried until a working one is found.

Also fix some more buildfiles problem for Haiku (and probably Linux)
* Define size_t to help with libdsk header tests
* Fix strcasecmp detection