Compile fixes for merge, reaching linking stage.