Add conditionals to Makefile for R16 support

Add conditionals to Makefile so that the project can be built standalone. This
accounts for a change in the Erlang crypto API between R15 and R16.