Fix GET_PROGRAM_NAME() on Solaris to not try to modify a read-only string