Changed implementation of define and lookup to use object key instead of
int symbol codes.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>