Support for non-standard baud rate in Linux

libMonoPosixHelper does not support non standard baud rates on Linux.
I needed this feature as 3D printers often use 250000baud communications.

I would like to have this feature included in mainstream code, otherwise I have to download, patch and compile mono from the source code at each new release of mono.
It is a general purpose feature, it can be useful for many other applications.
If std_baud_rate == -1 at this point it means that it is non-standard baud rate, in this case it has been set to 38400baud here above (cfset{i,o}speed need a legal value) and in the following lines it gets changed to the actual value. 
I have used an unsigned int array and redefined TCGETS2 TCSETS2 because there are incompatibilites between header files. termios.h is incompatible with asm/termbits.h or linux/termios.h. 
termios.h (posix) defines cfsetospeed and struct termios but not TC{G,S}ETS2 and struct termios2. linux/termios.h defines struct termios, struct termios2, but not cfsetospeed. The inclusion of one of them leads to some missing definitions, trying to include both results in struct termios redefinition.
An option would be to add a specific c source file just to set non-standard baud rates on serial lines for linux.
This temporary solution (waiting for somebody to fix the header files) is safe: the value of ioctl constants and offsets of fields in ioctl's argument cannot be changed, binary programs would fail.
The only open issue is source code readability...