Use bouncy castle v2 API to allow use of 1.50 and higher.