I don't understand, why it doesn't work for you. I have tested both algorithms on different Macs with four different versions of Mac OS X (10.5.8 Leopard, 10.6.8 Snow Leopard, 10.9.5 Mavericks and 10.11.2 El Capitan) and different processor architectures (PPC and Intel), and with different versions of FPC (2.6.4 and 3.0.0) and Lazarus (1.4.0, 1.4.4 and 1.6.0RC1), and they work in every configuration.
Please find a test project with both algorithms (you can switch between them with the compiler switch JurassicAlgorithm) in the attachment. Does it work on your machine?