Added backwards compatibility through conditional compilation.