Fix socket options not available on some OS