add RPath patching functionality into build script

Needed for Android cross compilations to get rid of linker
warnings.

Change-Id: I2379acac332dc734dddff5cc83df906ae32e17cc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>