Court orders release of former Nigerian security chief