Also include prefix dir in install paths

Fixes #2665