Awesome WM support for IntelliJ

Awesome WM has some issues with Java applications (https://awesome.naquadah.org/wiki/Problems_with_Java). When you start IntelliJ while using Awesome WM you just get a gray window. To fix this you basically have to fake the window manager name using the wmname tool.
The lines I added first test if the wmname tool is available and then use it to set the window manaer name to LG3D (which apparently is one that java likes).
It would be awesome if you could pull this one in. Feel free to remove the huge comment I put there to justify the 3 lines of code I added.