sh-compatible function definition in installer.

`function` seems to be a bash-ism.