Update build scripts to add init.d support