Move linux stuff to a separate library