Ugandan novelist granted bail 4 weeks after arrest