indeed, seems like it doesn't like variable declared like $(var) in the conditional section. Maybe it interferes with the parenthesis of the the if declaration?
should be added to the wiki (or even better, fixed...) if it turns out to be so.
thanks for your time!
edit:
omg! this rocks so hard! I had multiple global vars defined for each version of the library used. Now I have one for each library with a default version defined to use. This can be overridden in the project root's custom var section. just enter in the version you want to use and everything just works. I love it!