[core] Full support for different installation prefixes