Added `ifdef ... ` as a temporary alternative to `require “...” if ..`
Use ifdef
Removed `require “...” if ...`
Some fixes for linux