Raising age for consensual sex 'undemocratic': Court