Some portability fixes. Linker fix.