[DDMD] Make dylib a warning and fix #ifs

`#if`s which cut expressions or statements cannot be automatically ported to D, so move them inside the block.