My preference for this is to use a very small magnet.
As i proposed here, you can fool the Mac into thinking that the lid is closed by placing a very weak magnet on the sensor that is normally triggered when you close the lid.
The exact position of that sensor varies, but it should be somewhere at the very edge of the laptop, just behind the trackpad.
Of course you must be extremely careful bringing magnets near computers, but if you use one that is weak enough and small enough, you should be able to reproduce the effect of the magnet that is currently in the display portion of your laptop.
This uses the Apple laptop's normal mechanism to determine whether the lid is closed.. No mucking about in NVRAM, no rebooting with the lid closed, etc...
Finally, it must be noted that all Apple laptops are designed to be able to function in clamshell mode (and have been since the PowerBook Duo), as long as you do not obstruct the cooling intake and exhaust areas.