More portability fixes for the init script.