The jailbreak tool Redsn0w by iPhone Dev Team that works for Windows and Mac is updated to Redsn0w 0.9.10 b6b with some fixes for Mac OS X 10.5.x or earlier.
Redsn0w 0.9.10 b6b is a tethered jailbreak for non-A5 devices like iPhone 4, iPhone 3GS (new bootrom) and original iPad running over iOS 5.1 and gives an untethered jailbreak solution for iPhone 3GS with older bootrom.
Download Redsn0w 0.9.10b6b for OS X
Download Redsn0w 0.9.10b6 for Windows
How to Jailbreak iOS 5.1 with Sn0wBreeze
How to Jailbreak iOS 5.1 with RedSn0w