I don't have my Mac in front of me, but you can do this using Seil[1] and Karabiner[2]. From recollection, you disable caps-link in OS X settings, use Seil to map caps-lock to control, and then use Karabiner to map tapped-ctrl to escape. Sounds a bit hackish, but it works very well.
You can also do the same thing on Linux using xcape[3]
If pressed and released without another keypress in between, it sends ESC.
If pressed in combination with another key, it's CTRL.
I haven't found a way to do this dual mapping on OSX, so it's just CTRL there. I use AutoHotKey for this on windows.