Change zinc to support tests

Adds the required cfg attributes to build with --test and mocks out
all the functions with inline asm.