add internal function for checking if a device is a serial port (on
linux)