spin threshold calculation tuned for JDK 7