Backport revision 555794 from trunk: Set the $prefix variable to the default prefix path if none was specified (with --prefix). PR: 42658