If you try to use the serial port communication without having the LibSerial support, the constructor will fail and throw a LibSerialNotAvailable exception. It means that when the configure script has not detected the LibSerial library on your computer. Check your config.log, it should contain something like that:
If the result is no, please specify the header and library path in CPPFLAGS and LDFLAGS. For instance, if you are using gcc (which is usually the case), it should be something like that:
Note: if you have installed a package to get this library, please ask the maintainer of the package for your distribution to enable the LibSerial support.