I have an implementation I wrote in C++ with Python bindings. You can specify an arbitrary structure for the neural network using a dot schema. It also supports recursion. Its part of a more general open source project of mine called "AILib". You can download it here:
http://kovachtech.com/downloads.html
DISCLAIMER: its still in beta mode, so forgive the occasional compiler error, especially if you're using Windows (its been tested in Ubuntu 12.04 and Mac OS X).
If you are interested in something a solution a little more 'out of the box', R has a package called 'nnet' which has a parameter called 'hidden' in which you can set the number of hidden layers. There's a pretty good article about it here: