Add macro generator and tests to handle erlangs with/without maps