Sm path fix

I don't like patching SM / XAPI in this way, but since the path will be decided at build time, and is different on each target, this seemed to be the safest change for now.

A longer term fix to add configurable paths to SM and configure this for XAPI is preferable.