Check constant existence before defining it

Reference issue #23
Merge pull request #24 from Mihailoff/patch-1

Check constant existence before defining it