BUG-5410: add minimal IntStack implementation