Court upholds controversial Australian mining tax