Tor fails to build with latest OpenSSL master

I'm running Mac OS X 10.11.2 and installed the latest OpenSSL from their master branch (1de1d7689a81f2a3ed3348926e6a31ef79a2bc15). Current Tor master (cdbb04be) fails to build with the following warnings:

src/common/crypto.c:376:26: warning: implicit declaration of function
      'ENGINE_get_default_ECDH' is invalid in C99
      [-Wimplicit-function-declaration]
      log_engine("ECDH", ENGINE_get_default_ECDH());
                         ^
src/common/crypto.c:376:26: warning: incompatible integer to pointer conversion
      passing 'int' to parameter of type 'ENGINE *' (aka 'struct engine_st *')
      [-Wint-conversion]
      log_engine("ECDH", ENGINE_get_default_ECDH());
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
src/common/crypto.c:173:36: note: passing argument to parameter 'e' here
log_engine(const char *fn, ENGINE *e)
                                   ^
src/common/crypto.c:377:27: warning: implicit declaration of function
      'ENGINE_get_default_ECDSA' is invalid in C99
      [-Wimplicit-function-declaration]
      log_engine("ECDSA", ENGINE_get_default_ECDSA());
                          ^
src/common/crypto.c:377:27: warning: incompatible integer to pointer conversion
      passing 'int' to parameter of type 'ENGINE *' (aka 'struct engine_st *')
      [-Wint-conversion]
      log_engine("ECDSA", ENGINE_get_default_ECDSA());
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/crypto.c:173:36: note: passing argument to parameter 'e' here
log_engine(const char *fn, ENGINE *e)
                                   ^
4 warnings generated.

and following error messages:

Undefined symbols for architecture x86_64:
  "_ENGINE_get_default_ECDH", referenced from:
      _crypto_global_init in libor-crypto.a(crypto.o)
  "_ENGINE_get_default_ECDSA", referenced from:
      _crypto_global_init in libor-crypto.a(crypto.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [src/or/tor] Error 1
make: *** [all] Error 2