Imperial Oil beats on Q2 oil production, post higher than expected loss