Modified AddSTPGTest function so macro defines can be passed. This
has been used to modify three C api test cases which tried to open
files and previously failed.