fix bug:

the handle "hSerial" is a pointer on windows and a int on linux therefore one cant use nullptr to initialize it. using NULL instead